<template>
	<view>
		<view class="search-item">
			<view class="input-item">
				<input type="text" v-model="value" :placeholder="placeholder" />
			</view>
			<view class="input-search" @click="searchVal">
				<image src="../../static/search.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			placeholder: String,
			value: String
		},
		data() {
			return {

			};
		},
		methods: {
			searchVal() {
				this.$emit('click', this.value)
			}
		}
	}
</script>

<style lang="less" scoped>
	uni-view {
		line-height: 0;
	}

	.search-item {
		padding: 10px 5px 10px 5px;
		background: #ffffff;
		display: flex;
		justify-content: space-around;

		.input-item {
			width: 88%;
			height: 30px;

			input {
				border-radius: 6px;
				border: 1px solid #CCCCCC;
				height: 20px;
				box-shadow: 2px 1px 1px #CCCCCC inset;
				padding: 4px;
			}
		}

		.input-search {
			width: 32px;
			height: 32px;

			image {
				width: 32px;
				height: 32px;
			}
		}
	}
</style>
